<template>
	<view class="flex-row justify-between self-stretch group_4">
		<view class="flex-row items-center self-center">
			<view class="flex-col justify-start items-end section_6">
				<u-image :src="chat.userAvatar" height="96rpx" width="96rpx" border-radius="26" />
				<view v-if="chat.unReadChatNum" class="flex-col justify-start items-center badge"><text
						class="font_2">{{chat.unReadChatNum}}</text></view>
			</view>
			<view class="ml-8 flex-col">
				<view class="flex-row items-baseline">
					<text class="font_4">{{chat.userNickname||'--'}}</text>
					<!-- <text class="ml-4 font_3">宠物出行·xxx</text> -->
				</view>
				<text v-if="chat.isPicture==0" class="mt-12 font_6">{{chat.lastChatContent}}</text>
				<text v-if="chat.isPicture==1" class="mt-12 font_6">图片</text>
				<text v-if="chat.isPicture==2" class="mt-12 font_6">[位置]</text>
			</view>
		</view>
		<text class="self-start font_5 text_6">{{chat.lastChatDate}}</text>
	</view>
</template>

<script>
	export default {
		props: {
			chat: {
				type: Object,
				default: {

				}
			},
		},
	}
</script>

<style lang="scss" scoped>
	.group_4 {
		padding: 24rpx 0;

		.section_6 {
			width: 96rpx;
			height: 96rpx;
			position: relative;

			.badge {
				position: absolute;
				top: 0px;
				right: 0;
				padding: 8rpx;
				background-color: #ff7676;
				border-radius: 32rpx;
				width: max-content;

				.font_2 {
					font-size: 24rpx;
					font-family: PingFang SC;
					line-height: 17.14rpx;
					font-weight: 700;
					color: #ffffff;
				}
			}
		}

		.font_4 {
			font-size: 28rpx;
			font-family: PingFang SC;
			line-height: 20rpx;
			font-weight: 700;
			color: #000000;
		}

		.font_3 {
			font-size: 24rpx;
			font-family: PingFang SC;
			line-height: 22.22rpx;
			color: #999999;
		}

		.font_6 {
			font-size: 24rpx;
			font-family: PingFang SC;
			line-height: 23.96rpx;
			color: #999999;
		}

		.font_5 {
			font-size: 24rpx;
			font-family: PingFang SC;
			line-height: 17.14rpx;
			color: #999999;
		}

		.text_6 {
			margin-top: 8rpx;
			line-height: 17.8rpx;
			white-space: nowrap;
		}
	}
</style>